package main

import (
	"bufio"
	"fmt"
	"os"
	"time"
)

const HELLO = "Hello World!"

func main() {
	go test()
	time.Sleep(10)
	sayHello()
	fmt.Println("over")
}
func sayHello() {
	fmt.Println(HELLO)
}
func test() {
	fmt.Println("test")
	reader := bufio.NewReader(os.Stdout)
	readString, flag, err := reader.ReadLine()
	if err != nil {
		fmt.Fprintf(os.Stderr, "发生错误:%s", err)
		return
	}
	fmt.Println(flag)
	if string(readString) != HELLO {
		fmt.Fprintf(os.Stderr, "不等")
		return
	}
	fmt.Println("相等")
}
